package com.open.rbac.config.security;

import java.util.Collection;
import java.util.List;

import lombok.Getter;
import lombok.Setter;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.GrantedAuthority;

/**
 * 认证Token
 *
 * @author Riche's
 * @since 2025/5/25
 */
@Getter
@Setter
public class MeUsernamePasswordAuthenticationToken extends UsernamePasswordAuthenticationToken {

    private String id;

    private String avatar;

    private String username;

    private String password;

    private String realName;

    private String email;

    private String phone;

    private List<String> roleIds;


    public MeUsernamePasswordAuthenticationToken(Object principal, Object credentials) {
        super(principal, credentials);
    }

    public MeUsernamePasswordAuthenticationToken(Object principal, Object credentials, Collection<? extends GrantedAuthority> authorities) {
        super(principal, credentials, authorities);
    }

    @Override
    public boolean equals(Object obj) {
        return super.equals(obj);
    }

    @Override
    public int hashCode() {
        return super.hashCode();
    }
}
